import request from '@/utils/request'

//列表
export function personList(query) {
  return request({
    url: '/performance/listPage',
    method: 'get',
    params: query
  })
}
//目标总和
export function targetTotal(query) {
  return request({
    url: '/performance/getTargetTotal',
    method: 'get',
    params: query
  })
}
//添加年度目标
export function addTarget(data) {
  return request({
    url: '/performance',
    method: 'post',
    data: data
  })
}
//详情/performance/{id}
export function performanceDetail(id) {
  return request({
    url: '/performance/'+id,
    method: 'get',
  })
}
//删除/performance/{id}
export function delPerformance(id) {
  return request({
    url: '/performance/'+id,
    method: 'DELETE',
  })
}
//数据修改
export function editTarget(data) {
  return request({
    url: '/performance',
    method: 'put',
    data: data
  })
}
//批量编辑
export function editBatchTarget(data) {
  return request({
    url: '/performance/editBatch',
    method: 'put',
    data: data
  })
}
// 员工业绩
export function userPerformancePage(query) {
  return request({
    url: '/performance/userPerformancePage',
    method: 'get',
	params: query
  })
}
//员工提成
export function userCommissionPage(query) {
  return request({
    url: '/performance/userCommissionPage',
    method: 'get',
	params: query
  })
}